import request from '@/utils/request'
import {isEmptyString} from "@/utils/common";

export function generateDoc(data) {
    return request({
        url: '/file/fileForm' ,
        method: 'post',
        data: data
    })
}
//生成文书
export function generateDocVip({id,orderNumber}) {
    if(isEmptyString(orderNumber)){
        return request({
            url: '/file/fileGenerate?id='+id,
            method: 'get',
        })
    }
    return request({
        url: '/file/fileGenerate?id='+id+'&orderNumber='+orderNumber ,
        method: 'get',
    })
}
//文书预设列表
export function getDocList(data) {
    return request({
        url: '/presets/list',
        method: 'get',
        params: data
    })
}
//文书预设详情
export function getDoc(id) {
    return request({
        url: '/presets/info?id='+id,
        method: 'get',
    })
}